﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example04.aspx.cs" Inherits="Chapter26.Example04" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 26-4 通过给某个 Location 属性指派新值来导航到另一个文档上</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
</head>
<body>
    <p>
        There are lots of different kinds of fruit - there are you over 500 
        varieties of banana alone. By the time we add the 
        countless types of apples, oranges, and other 
        well-known fruit, we are faced with thousands of choices.
    </p>
    <button id="pressme">Press Me</button>
    <p>
        One of the most interesting aspects of fruit is the
        variety available in each country. I live near London, in an area which is
        known for its apples.
    </p>
    <img id="banana" src="images/banana-small.png" alt="small banana" />
    <script>
        document.getElementById("pressme").onclick = function () {
            document.location.hash = "banana";
        }
    </script>
</body>
</html>
